package com.shqcjd.yunweiyanoperator.ui.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.shqcjd.yunweiyanoperator.R;
import com.shqcjd.yunweiyanoperator.ui.base.BaseActivity;
import com.shqcjd.yunweiyanoperator.ui.base.BasePresenter;
import com.shqcjd.yunweiyanoperator.util.EmptyUtils;

import net.lucode.hackware.magicindicator.buildins.UIUtil;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 专家资料
 */
public class ExpertInfoActivity extends BaseActivity {


    @BindView(R.id.btn_finish)
    ImageView btnFinish;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.tv_achievement)
    TextView tvAchievement;
    @BindView(R.id.tv_honor)
    TextView tvHonor;
    @BindView(R.id.iv_certificate)
    ImageView ivCertificate;
    private String performance;
    private String honor;
    private String technicalCertificate;

    @Override
    protected BasePresenter createPresenter() {
        return null;
    }

    @Override
    protected int provideContentViewId() {
        return R.layout.activity_expert_info;
    }

    @Override
    public void initView() {
        tvTitle.setText("专家资料");
        performance = getIntent().getStringExtra("performance");
        honor = getIntent().getStringExtra("honor");
        technicalCertificate = getIntent().getStringExtra("technicalCertificate");

        //维修业绩
        tvAchievement.setText(EmptyUtils.isEmpty(performance) ? "" : performance);
        //荣誉
        tvHonor.setText(EmptyUtils.isEmpty(honor) ? "" : honor);

        Glide.with(this).load(technicalCertificate).into(ivCertificate);

    }

    @OnClick({R.id.btn_finish, R.id.iv_certificate})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btn_finish:
                finish();
                break;
            case R.id.iv_certificate://点击查看证书大图
                break;
        }
    }
}
